<?php
$this->breadcrumbs = array(
	'Posts'=>array('index'),
	$model->name,
);

$this->menu = array(
	array('label'=>'List Post', 'url'=>array('index')),
	array('label'=>'Create Post', 'url'=>array('create')),
	array('label'=>'Update Post', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Post', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete', 'id'=>$model->id), 'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Post', 'url'=>array('admin')),
);
?>

<h1>
	Post
	<div class="right small top bottom">
		View:
		<?php
		$formatter = Yii::app()->numberFormatter;
		echo $formatter->format('#,##0', $model->viewCount);
		?>&times;
	</div>
</h1>

<?php
$this->renderPartial('_view', array('data'=>$model));

foreach ($model->replies as $reply) {
	$this->renderPartial(
		'application.views.reply._view', array('data'=>$reply)
	);
}

$this->renderPartial(
	'application.views.reply._form', array('model'=>$replyModel)
);
?>